package se.sll.service.catalogue.common.exception;

/**
 * Error codes for the service API.
 * 
 * @author Christer Palm, Nogui
 */
public enum ServiceErrorCode {
    // capacity
    UNIT_LIST_INVALID_EMPTY,        // Invalid input : List of units is empty
    INVALID_DAYS_FROM_NOW_RANGE,    // Invalid input, valid range is [{1, integer},{2, integer}], daysFromNow: {0, integer}"

    // gui
    UNIT_ID_NOT_UNIQUE,             // UnitId is not unique, unitId = {0}
    USERS_NOT_FOUND,                // Could not find all users. Not found: {0}
    CAPACITY_NOT_FOUND_HSAID,       // hsaID={0}
    CAPACITY_NOT_FOUND_UNIT_IDS,    // UnitIds={0}
    OFFERS_NOT_FOUND,               // 
    PRODUCTS_NOT_FOUND,             //
    UNITS_NOT_FOUND,                //
    CAPACITIES_NOT_FOUND,           //
    USER_NOT_FOUND,                 // User not found, userid={0}
    USER_NAMES_INVALID_EMPTY,       // List of users may not be empty
    INVALID_HSA_ID_EMPTY,           // Invalid input: hsaID = null or empty
    INVALID_PASSWORD_EMPTY,         // Must provide a password
    USER_ALREADY_EXISTS,            // Unable to create user: {0}, user already exists.
    INVALID_UNIT_IDS_EMPTY,         //
    INVALID_ROLES_EMPTY,            //
    INVALID_TIME_STAMP_EMPTY,       //
    REQUIRES_ADMIN,                 // Requires admin privileges
    REQUIRES_ADMIN_HSAID,           // Changing hsaId requires admin privileges
    REQUIRES_ADMIN_STATUS,          // Changing status requires admin privileges
    REQUIRES_ADMIN_ROLE,            // Changing role requires admin privileges
    REQUIRES_ADMIN_UNIT_ID,         // Changing careUnitID requires admin privileges
    USER_NAME_NOT_UNIQUE,           //
    USER_NAME_CANNOT_BE_CHANGED,    //
    INVALID_ROLE,                   //

    // offers
    OFFER_NOT_FOUND,                // hsaId={0}

    // product
    CODE_SYSTEM_NOT_FOUND_OID,      // oid={0}
    CODE_SYSTEM_ALREADY_EXISTS_OID, // Codesystem already exists: {0}
    PRODUCT_NOT_FOUND_NAME,         // name={0}
    CODE_ALREADY_EXISTS_CODESYSTEM_CODE,    // codeSystem={0} code={1}
    INVALID_DISPLAY_NAME_EMPTY,     //
    INVALID_DESCRIPTION_EMPTY,      //
    INVALID_PRODUCT_NAME_EMPTY,     //
    CODE_NOT_FOUND_OID_CODE,        //
    INVALID_PRODUCT_NAMES_EMPTY,    //
    INVALID_CODE_EMPTY,             //
    INVALID_OID_EMPTY,              //

    // idmap
    HSAID_ALREADY_EXISTS_HSAID,     // Unable to create HSAId: {0}, HSAId already exists.
    SKLID_ALREADY_EXISTS_SKLID,     // Unable to create SKLId: {0}, SKLId already exists.
    VMCAREGIVERPARTID_ALREADY_EXISTS_VMID_VMCAREGIVERPARTID, // Unable to create VMId: {0}:{1}, already exists.
    SKLID_NOT_FOUND_SKLID,          // Unable to update SKLId: {0}, SKLId does not exist.
    VMID_NOT_FOUND_VMID,            // Unable to update VMId: {0}, VMId does not exist.
    HSAID_NOT_FOUND_HSAID,          // Unable to update HSAId: {0}, HSAId does not exist.
    
    // export
    EXPORT_INVALID_HOURS,
    
    // contract
    CONTRACT_NOT_FOUND,

    UNKNOWN
}
